import { request } from "@/utils/request";


enum Api{
	REGISTER="/user/register",
	LOGIN = "/user/login",
	INFO = "/user/getUserInfo",
	UPDATE_PASSWORD = "/user/updateCurrentUserPassword"
}

export function registerUser(data:any){
	return request({url:Api.REGISTER,data,method:"POST"})
}

export function loginUser(data:any){
	return request({url:Api.LOGIN,data,method:"POST"})
}
export function getUserInfo(){
	return request({url:Api.INFO,method:'GET'})
}
export function updatePassword(data:any){
	return request({url:Api.UPDATE_PASSWORD,data,method:"POST"})
}